package cn.yueranzs.response;

public enum RedisResultCode implements CustomizeResultCode{

    /*验证码失效时间，单位：s*/
    REDIS_RESULT_CODE(120,"验证码失效时间"),
    /*redis报错提示语*/
    REDIS_PLEASE(205,"请刷新重试或者联系研发人员，错误：redisTemplate is Null"),
    /*验证码代号*/
    REDIS_RANDOM_CODE(207,"code_"),
    /*token代号*/
    REDIS_TOKEN_CODE(208,"token_"),
    /*用户代号*/
    REDIS_USER_CODE(209,"user_"),


    ;

    private Integer code;
    private String message;

    RedisResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 获取错误状态码
     *
     * @return 错误状态码
     */
    @Override
    public Integer getCode() {
        return code;
    }

    /**
     * 获取错误信息
     *
     * @return 错误信息
     */
    @Override
    public String getMessage() {
        return message;
    }
}
